package com.maltys.controller;

import com.maltys.redission.manager.RedissonManager;
import org.redisson.api.RBloomFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/bloom")
public class RedissionBloomFilterController {
    @Autowired
    private RedissonManager redissonManager;

    @RequestMapping("/get_bloom")
    public Object getBloomFilter() {
        RBloomFilter aBloomFilter = redissonManager.getABloomFilter();
        return aBloomFilter.getSize();
    }
}
